<?php

// username:   this.username,
// password:   this.password,
// pen_name:   this.pen_name,
// true_name:  this.true_name,
// mobile:     this.mobile,
// email:      this.email,
// desc:       this.desc,
// role_id:    this.role_id,

require "database.php";

$base=new Db;

$username   =$_POST['user_name'];
$password   =$_POST['password'];
$pen_name   =$_POST['pen_name'];
$true_name  =$_POST['true_name'];
$mobile     =$_POST['mobile'];
$email      =$_POST['email'];
$desc       =$_POST['desc'];
$admin_id   =(int)$_POST['admin_id'];

$password=md5($password);

$__admin__=$base->doSql('update ey_admin set user_name="'.$username.'",password="'.$password.'",pen_name="'.$pen_name.'",true_name="'.$true_name.'",mobile="'.$mobile.'",email="'.$email.'",`desc`="'.$desc.'",add_time="'.time().'" where admin_id="'.$admin_id.'"');

if($__admin__){
    return json([
        "code"=>200
    ]);
}

